package org.elte.lipika.domain;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import org.elte.lipika.domain.Original;
import javax.persistence.ManyToOne;
import java.util.Set;
import org.elte.lipika.domain.Occurence;
import java.util.HashSet;
import javax.persistence.ManyToMany;
import javax.persistence.CascadeType;
import org.elte.lipika.domain.Example;

@RooJavaBean
@RooToString
@RooEntity
public class Terminus {

    @ManyToOne
    private Original interpretation;

    private String circumscription;

    private String definition;

    private String authorClassification;

    private String comment;

    @ManyToOne
    private Original origLatin;

    private String origHun;

    @ManyToMany(cascade = CascadeType.ALL)
    private Set<Occurence> occurences = new HashSet<Occurence>();

    @ManyToMany(cascade = CascadeType.ALL)
    private Set<Example> examples = new HashSet<Example>();
}
